package com.shuziren.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.shuziren.entity.InterviewStatistics;
import com.shuziren.mapper.InterviewStatisticsMapper;
import com.shuziren.service.InterviewStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InterviewStatisticsServiceImpl extends ServiceImpl<InterviewStatisticsMapper, InterviewStatistics> implements InterviewStatisticsService {

    @Autowired
    private InterviewStatisticsMapper interviewStatisticsMapper;

    /**
     * 查询所有面试统计数据
     * @return 返回所有面试统计数据的列表
     */
    @Override
    public List<InterviewStatistics> findAll() {
        return interviewStatisticsMapper.selectList(null);
    }

    /**
     * 根据ID查询面试统计数据
     * @param id 面试统计数据的ID
     * @return 返回对应ID的面试统计数据
     */
    @Override
    public InterviewStatistics findById(Long id) {
        return interviewStatisticsMapper.selectById(id);
    }

    /**
     * 根据ID删除面试统计数据
     * @param id 面试统计数据的ID
     */
    @Override
    public void deleteById(Long id) {
        interviewStatisticsMapper.deleteById(id);
    }

}